import React, { useState, useEffect } from 'react';
import planIcon from '@/assets/img/plan_icon.png';
import _ from 'lodash';
import type { ReactNode } from 'react';
import './index.less';

/**
 * 使用场景欠缺，不完善
 */
const TjModalTitle: React.FC<ITjModalTitleProps> = (props) => {
  return (
    <div className="tj-modal-title">
      <img src={_.isString(props.icon) ? props.icon : planIcon} alt="" className="img" />
      {props.title || props.children}
    </div>
  );
};

interface ITjModalTitleProps {
  title?: ReactNode;
  icon?: string | null | undefined;
  children?: ReactNode;
}

export { TjModalTitle };
